function validateForm()
{
	var firstName = document.Form["registerform"]["fName"].value;
	var lastName = document.Form["registerform"]["lName"].value;
	var username = document.Form["registerform"]["username"].value;
	var password = document.Form["registerform"]["password"].value;
	var passwordconfirm = document.Form["registerform"]["passwordconfirm"].value;
	var email = document.Form["registerform"]["email"].value;
	var birthyear = document.Form["registerform"]["bd_year"].value;
	var strAlert = new String();
	var atpos=email.indexOf("@");
	var dotpos=email.lastIndexOf(".");
	var d = new Date();
		
	if(firstName == "" || firstName == null)
		strAlert = "First Name must be filled out. \n";
	if(lastName == "" || lastName == null)
		strAlert += "Last name must be filled out. \n";
	if(username == "" || username == null)
		strAlert += "User Name must be filled out. \n";
	if(password == "" || password == null)
		strAlert += "Password must be filled out. \n";
	if(passwordconfirm != Password)
		strAlert += "Both passwords must mactch. \n";
	if(atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length))
		strAlert += "Not a valid e-mail address \n";
	if(birthyear="" || birthyear=null || bithyear > d.getFullYear() || bithyear < (d.getFullYear() - 120))
		strAlert += "Bithday's year is invalid. ";
	
	if (strAlert == null || strAlert == "")
		return true;
	else
		return false;
}